<ol class="dd-list">
    <?php foreach ($cats as $item): ?>
        <li class="dd-item" data-id="<?php echo $item['cat_id']; ?>">
            <div class="dd-handle">
                <span class="pull-right"> <?php echo date('Y-m-d H:i:s', $item['cat_create_time']); ?></span>
                <span class="label label-info"><i class="fa fa-folder-open"></i></span>
                <?php echo $item['cat_name']; ?>
            </div>
            <?php if (count($item['child'])) { ?>
                <ol class="dd-list">
                    <?php foreach ($item['child'] as $val): ?>
                        <li class="dd-item" data-id="<?php echo $val['cat_id']; ?>">
                            <div class="dd-handle">
                                <span class="pull-right"> <?php echo date('Y-m-d H:i:s', $val['cat_create_time']); ?></span>
                                <span class="label label-info"><i class="fa fa-folder-open"></i></span> 
                                <?php echo $val['cat_name']; ?>
                            </div>
                        </li>
                    <?php endforeach; ?>
                </ol>
            <?php } ?>
        </li>
    <?php endforeach; ?>
</ol>
